<%@ page import="com.surelution.lansao.MemberAddress" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="mobile" />
        <g:set var="entityName" value="${message(code: 'memberAddress.label', default: 'MemberAddress')}" />
        <title>今日菜单</title>
        <script type="text/javascript">
			
        </script>
    </head>
    <body>
        <div class="body">
	        <g:form action="placeOrder">
	            <h1>今日菜单</h1>
	            <g:if test="${flash.message}">
	            <div style="color: red">${flash.message}</div>
	            </g:if>
	            <g:if test="${addresses }">
	            	<g:radioGroup values="${addresses.collect({it.id}) }" name="address.id" labels="${addresses.collect({it.address}) }">
	            		${it.label }${it.radio }<br/>
	            	</g:radioGroup>
	            	或者，<a href="editAddress?flashId=${params.flashId }">登记新的送餐地址</a>
	            </g:if>
	            <g:else>
	            	您没有登记送餐地址，请移步前往<a href="editAddress?flashId=${params.flashId }">登记送餐地址</a>。下次如果还是送到该地址，无需再次登记。
	            </g:else>
	            <br/>
	            <g:hiddenField name="flashId" value="${params.flashId}"/>
	            <g:each in="${items }" var="item">
	            	${item.name }(${item.price }元)<g:field type="number" name="item_${item.id}" value="${(chosenId==String.valueOf(item.id))?1:0 }" style="width:40px"/>份<br/>
	            </g:each>
	            <g:actionSubmit class="edit" action="placeOrder" value="${message(code: 'default.button.order.label', default: '订餐')}" />
            </g:form>
        </div>
    </body>
</html>
